.class Lcom/waiqin365/lightapp/kehu/gc;
.super Landroid/os/Handler;


# instance fields
.field final synthetic a:Lcom/waiqin365/lightapp/kehu/CMSearchingForVisitActivity;


# direct methods
.method constructor <init>(Lcom/waiqin365/lightapp/kehu/CMSearchingForVisitActivity;)V
    .locals 0

    iput-object p1, p0, Lcom/waiqin365/lightapp/kehu/gc;->a:Lcom/waiqin365/lightapp/kehu/CMSearchingForVisitActivity;

    invoke-direct {p0}, Landroid/os/Handler;-><init>()V

    return-void
.end method


# virtual methods
.method public handleMessage(Landroid/os/Message;)V
    .locals 8

    const/4 v3, 0x1

    const/16 v7, 0x8

    const/4 v6, 0x0

    iget-object v0, p0, Lcom/waiqin365/lightapp/kehu/gc;->a:Lcom/waiqin365/lightapp/kehu/CMSearchingForVisitActivity;

    invoke-virtual {v0}, Lcom/waiqin365/lightapp/kehu/CMSearchingForVisitActivity;->dismissProgressDialog()V

    invoke-super {p0, p1}, Landroid/os/Handler;->handleMessage(Landroid/os/Message;)V

    iget v0, p1, Landroid/os/Message;->what:I

    packed-switch v0, :pswitch_data_0

    :goto_0
    return-void

    :pswitch_0
    iget-object v0, p0, Lcom/waiqin365/lightapp/kehu/gc;->a:Lcom/waiqin365/lightapp/kehu/CMSearchingForVisitActivity;

    invoke-static {v0, v6}, Lcom/waiqin365/lightapp/kehu/CMSearchingForVisitActivity;->a(Lcom/waiqin365/lightapp/kehu/CMSearchingForVisitActivity;Z)Z

    iget-object v0, p1, Landroid/os/Message;->obj:Ljava/lang/Object;

    check-cast v0, Lcom/waiqin365/lightapp/kehu/a/a/bh;

    if-eqz v0, :cond_1

    const-string/jumbo v1, "1"

    iget-object v2, v0, Lcom/waiqin365/lightapp/kehu/a/a/bh;->d:Ljava/lang/String;

    invoke-virtual {v1, v2}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z

    move-result v1

    if-eqz v1, :cond_1

    iget-object v1, p0, Lcom/waiqin365/lightapp/kehu/gc;->a:Lcom/waiqin365/lightapp/kehu/CMSearchingForVisitActivity;

    iget-object v2, v0, Lcom/waiqin365/lightapp/kehu/a/a/bh;->h:Ljava/lang/String;

    invoke-static {v2, v3}, Lcom/fiberhome/gaea/client/d/k;->a(Ljava/lang/String;I)I

    move-result v2

    invoke-static {v1, v2}, Lcom/waiqin365/lightapp/kehu/CMSearchingForVisitActivity;->a(Lcom/waiqin365/lightapp/kehu/CMSearchingForVisitActivity;I)I

    iget-object v1, p0, Lcom/waiqin365/lightapp/kehu/gc;->a:Lcom/waiqin365/lightapp/kehu/CMSearchingForVisitActivity;

    invoke-static {v1}, Lcom/waiqin365/lightapp/kehu/CMSearchingForVisitActivity;->a(Lcom/waiqin365/lightapp/kehu/CMSearchingForVisitActivity;)I

    move-result v1

    iget-object v2, p0, Lcom/waiqin365/lightapp/kehu/gc;->a:Lcom/waiqin365/lightapp/kehu/CMSearchingForVisitActivity;

    invoke-static {v2}, Lcom/waiqin365/lightapp/kehu/CMSearchingForVisitActivity;->b(Lcom/waiqin365/lightapp/kehu/CMSearchingForVisitActivity;)I

    move-result v2

    if-lt v1, v2, :cond_2

    iget-object v1, p0, Lcom/waiqin365/lightapp/kehu/gc;->a:Lcom/waiqin365/lightapp/kehu/CMSearchingForVisitActivity;

    invoke-static {v1}, Lcom/waiqin365/lightapp/kehu/CMSearchingForVisitActivity;->c(Lcom/waiqin365/lightapp/kehu/CMSearchingForVisitActivity;)Lcom/waiqin365/lightapp/dailyreport/view/CustomListview;

    move-result-object v1

    invoke-virtual {v1}, Lcom/waiqin365/lightapp/dailyreport/view/CustomListview;->f()V

    :cond_0
    :goto_1
    iget-object v1, v0, Lcom/waiqin365/lightapp/kehu/a/a/bh;->f:Ljava/lang/String;

    invoke-static {v1}, Landroid/text/TextUtils;->isEmpty(Ljava/lang/CharSequence;)Z

    move-result v1

    if-nez v1, :cond_3

    iget-object v1, p0, Lcom/waiqin365/lightapp/kehu/gc;->a:Lcom/waiqin365/lightapp/kehu/CMSearchingForVisitActivity;

    const v2, 0x7f08071f

    invoke-virtual {v1, v2}, Lcom/waiqin365/lightapp/kehu/CMSearchingForVisitActivity;->getString(I)Ljava/lang/String;

    move-result-object v1

    new-array v2, v3, [Ljava/lang/Object;

    new-instance v3, Ljava/lang/StringBuilder;

    invoke-direct {v3}, Ljava/lang/StringBuilder;-><init>()V

    iget-object v4, v0, Lcom/waiqin365/lightapp/kehu/a/a/bh;->f:Ljava/lang/String;

    invoke-virtual {v3, v4}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v3

    const-string/jumbo v4, ""

    invoke-virtual {v3, v4}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v3

    invoke-virtual {v3}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v3

    aput-object v3, v2, v6

    invoke-static {v1, v2}, Ljava/lang/String;->format(Ljava/lang/String;[Ljava/lang/Object;)Ljava/lang/String;

    move-result-object v1

    new-instance v2, Landroid/text/SpannableStringBuilder;

    invoke-direct {v2, v1}, Landroid/text/SpannableStringBuilder;-><init>(Ljava/lang/CharSequence;)V

    iget-object v3, v0, Lcom/waiqin365/lightapp/kehu/a/a/bh;->f:Ljava/lang/String;

    invoke-virtual {v1, v3}, Ljava/lang/String;->indexOf(Ljava/lang/String;)I

    move-result v1

    iget-object v3, v0, Lcom/waiqin365/lightapp/kehu/a/a/bh;->f:Ljava/lang/String;

    invoke-virtual {v3}, Ljava/lang/String;->length()I

    move-result v3

    add-int/2addr v3, v1

    new-instance v4, Landroid/text/style/ForegroundColorSpan;

    const-string/jumbo v5, "#ff9008"

    invoke-static {v5}, Landroid/graphics/Color;->parseColor(Ljava/lang/String;)I

    move-result v5

    invoke-direct {v4, v5}, Landroid/text/style/ForegroundColorSpan;-><init>(I)V

    const/16 v5, 0x22

    invoke-virtual {v2, v4, v1, v3, v5}, Landroid/text/SpannableStringBuilder;->setSpan(Ljava/lang/Object;III)V

    iget-object v1, p0, Lcom/waiqin365/lightapp/kehu/gc;->a:Lcom/waiqin365/lightapp/kehu/CMSearchingForVisitActivity;

    invoke-static {v1}, Lcom/waiqin365/lightapp/kehu/CMSearchingForVisitActivity;->d(Lcom/waiqin365/lightapp/kehu/CMSearchingForVisitActivity;)Landroid/widget/LinearLayout;

    move-result-object v1

    invoke-virtual {v1, v6}, Landroid/widget/LinearLayout;->setVisibility(I)V

    iget-object v1, p0, Lcom/waiqin365/lightapp/kehu/gc;->a:Lcom/waiqin365/lightapp/kehu/CMSearchingForVisitActivity;

    invoke-static {v1}, Lcom/waiqin365/lightapp/kehu/CMSearchingForVisitActivity;->e(Lcom/waiqin365/lightapp/kehu/CMSearchingForVisitActivity;)Landroid/widget/TextView;

    move-result-object v1

    invoke-virtual {v1, v2}, Landroid/widget/TextView;->setText(Ljava/lang/CharSequence;)V

    :goto_2
    iget-object v1, v0, Lcom/waiqin365/lightapp/kehu/a/a/bh;->i:Ljava/util/ArrayList;

    if-eqz v1, :cond_1

    iget-object v1, p0, Lcom/waiqin365/lightapp/kehu/gc;->a:Lcom/waiqin365/lightapp/kehu/CMSearchingForVisitActivity;

    invoke-static {v1}, Lcom/waiqin365/lightapp/kehu/CMSearchingForVisitActivity;->f(Lcom/waiqin365/lightapp/kehu/CMSearchingForVisitActivity;)Ljava/util/ArrayList;

    move-result-object v1

    iget-object v0, v0, Lcom/waiqin365/lightapp/kehu/a/a/bh;->i:Ljava/util/ArrayList;

    invoke-virtual {v1, v0}, Ljava/util/ArrayList;->addAll(Ljava/util/Collection;)Z

    iget-object v0, p0, Lcom/waiqin365/lightapp/kehu/gc;->a:Lcom/waiqin365/lightapp/kehu/CMSearchingForVisitActivity;

    invoke-static {v0}, Lcom/waiqin365/lightapp/kehu/CMSearchingForVisitActivity;->g(Lcom/waiqin365/lightapp/kehu/CMSearchingForVisitActivity;)Lcom/waiqin365/lightapp/kehu/b/an;

    move-result-object v0

    iget-object v1, p0, Lcom/waiqin365/lightapp/kehu/gc;->a:Lcom/waiqin365/lightapp/kehu/CMSearchingForVisitActivity;

    invoke-static {v1}, Lcom/waiqin365/lightapp/kehu/CMSearchingForVisitActivity;->f(Lcom/waiqin365/lightapp/kehu/CMSearchingForVisitActivity;)Ljava/util/ArrayList;

    move-result-object v1

    invoke-virtual {v0, v1}, Lcom/waiqin365/lightapp/kehu/b/an;->a(Ljava/util/ArrayList;)V

    iget-object v0, p0, Lcom/waiqin365/lightapp/kehu/gc;->a:Lcom/waiqin365/lightapp/kehu/CMSearchingForVisitActivity;

    invoke-static {v0}, Lcom/waiqin365/lightapp/kehu/CMSearchingForVisitActivity;->f(Lcom/waiqin365/lightapp/kehu/CMSearchingForVisitActivity;)Ljava/util/ArrayList;

    move-result-object v0

    invoke-virtual {v0}, Ljava/util/ArrayList;->size()I

    move-result v0

    if-nez v0, :cond_4

    iget-object v0, p0, Lcom/waiqin365/lightapp/kehu/gc;->a:Lcom/waiqin365/lightapp/kehu/CMSearchingForVisitActivity;

    invoke-static {v0}, Lcom/waiqin365/lightapp/kehu/CMSearchingForVisitActivity;->h(Lcom/waiqin365/lightapp/kehu/CMSearchingForVisitActivity;)Landroid/widget/LinearLayout;

    move-result-object v0

    invoke-virtual {v0, v6}, Landroid/widget/LinearLayout;->setVisibility(I)V

    iget-object v0, p0, Lcom/waiqin365/lightapp/kehu/gc;->a:Lcom/waiqin365/lightapp/kehu/CMSearchingForVisitActivity;

    invoke-static {v0}, Lcom/waiqin365/lightapp/kehu/CMSearchingForVisitActivity;->c(Lcom/waiqin365/lightapp/kehu/CMSearchingForVisitActivity;)Lcom/waiqin365/lightapp/dailyreport/view/CustomListview;

    move-result-object v0

    invoke-virtual {v0, v7}, Lcom/waiqin365/lightapp/dailyreport/view/CustomListview;->setVisibility(I)V

    :goto_3
    iget-object v0, p0, Lcom/waiqin365/lightapp/kehu/gc;->a:Lcom/waiqin365/lightapp/kehu/CMSearchingForVisitActivity;

    invoke-static {v0}, Lcom/waiqin365/lightapp/kehu/CMSearchingForVisitActivity;->g(Lcom/waiqin365/lightapp/kehu/CMSearchingForVisitActivity;)Lcom/waiqin365/lightapp/kehu/b/an;

    move-result-object v0

    iget-object v1, p0, Lcom/waiqin365/lightapp/kehu/gc;->a:Lcom/waiqin365/lightapp/kehu/CMSearchingForVisitActivity;

    invoke-static {v1}, Lcom/waiqin365/lightapp/kehu/CMSearchingForVisitActivity;->i(Lcom/waiqin365/lightapp/kehu/CMSearchingForVisitActivity;)Ljava/lang/String;

    move-result-object v1

    invoke-virtual {v0, v1}, Lcom/waiqin365/lightapp/kehu/b/an;->a(Ljava/lang/String;)V

    iget-object v0, p0, Lcom/waiqin365/lightapp/kehu/gc;->a:Lcom/waiqin365/lightapp/kehu/CMSearchingForVisitActivity;

    invoke-static {v0}, Lcom/waiqin365/lightapp/kehu/CMSearchingForVisitActivity;->g(Lcom/waiqin365/lightapp/kehu/CMSearchingForVisitActivity;)Lcom/waiqin365/lightapp/kehu/b/an;

    move-result-object v0

    invoke-virtual {v0}, Lcom/waiqin365/lightapp/kehu/b/an;->notifyDataSetChanged()V

    :cond_1
    iget-object v0, p0, Lcom/waiqin365/lightapp/kehu/gc;->a:Lcom/waiqin365/lightapp/kehu/CMSearchingForVisitActivity;

    invoke-static {v0}, Lcom/waiqin365/lightapp/kehu/CMSearchingForVisitActivity;->c(Lcom/waiqin365/lightapp/kehu/CMSearchingForVisitActivity;)Lcom/waiqin365/lightapp/dailyreport/view/CustomListview;

    move-result-object v0

    const-string/jumbo v1, ""

    invoke-virtual {v0, v1}, Lcom/waiqin365/lightapp/dailyreport/view/CustomListview;->a(Ljava/lang/String;)V

    iget-object v0, p0, Lcom/waiqin365/lightapp/kehu/gc;->a:Lcom/waiqin365/lightapp/kehu/CMSearchingForVisitActivity;

    invoke-static {v0}, Lcom/waiqin365/lightapp/kehu/CMSearchingForVisitActivity;->c(Lcom/waiqin365/lightapp/kehu/CMSearchingForVisitActivity;)Lcom/waiqin365/lightapp/dailyreport/view/CustomListview;

    move-result-object v0

    invoke-virtual {v0}, Lcom/waiqin365/lightapp/dailyreport/view/CustomListview;->d()V

    iget-object v0, p0, Lcom/waiqin365/lightapp/kehu/gc;->a:Lcom/waiqin365/lightapp/kehu/CMSearchingForVisitActivity;

    invoke-virtual {v0}, Lcom/waiqin365/lightapp/kehu/CMSearchingForVisitActivity;->dismissProgressDialog()V

    goto/16 :goto_0

    :cond_2
    iget-object v1, p0, Lcom/waiqin365/lightapp/kehu/gc;->a:Lcom/waiqin365/lightapp/kehu/CMSearchingForVisitActivity;

    invoke-static {v1}, Lcom/waiqin365/lightapp/kehu/CMSearchingForVisitActivity;->c(Lcom/waiqin365/lightapp/kehu/CMSearchingForVisitActivity;)Lcom/waiqin365/lightapp/dailyreport/view/CustomListview;

    move-result-object v1

    invoke-virtual {v1}, Lcom/waiqin365/lightapp/dailyreport/view/CustomListview;->h()Z

    move-result v1

    if-nez v1, :cond_0

    iget-object v1, p0, Lcom/waiqin365/lightapp/kehu/gc;->a:Lcom/waiqin365/lightapp/kehu/CMSearchingForVisitActivity;

    invoke-static {v1}, Lcom/waiqin365/lightapp/kehu/CMSearchingForVisitActivity;->c(Lcom/waiqin365/lightapp/kehu/CMSearchingForVisitActivity;)Lcom/waiqin365/lightapp/dailyreport/view/CustomListview;

    move-result-object v1

    invoke-virtual {v1}, Lcom/waiqin365/lightapp/dailyreport/view/CustomListview;->g()V

    goto/16 :goto_1

    :cond_3
    iget-object v1, p0, Lcom/waiqin365/lightapp/kehu/gc;->a:Lcom/waiqin365/lightapp/kehu/CMSearchingForVisitActivity;

    invoke-static {v1}, Lcom/waiqin365/lightapp/kehu/CMSearchingForVisitActivity;->d(Lcom/waiqin365/lightapp/kehu/CMSearchingForVisitActivity;)Landroid/widget/LinearLayout;

    move-result-object v1

    invoke-virtual {v1, v7}, Landroid/widget/LinearLayout;->setVisibility(I)V

    goto/16 :goto_2

    :cond_4
    iget-object v0, p0, Lcom/waiqin365/lightapp/kehu/gc;->a:Lcom/waiqin365/lightapp/kehu/CMSearchingForVisitActivity;

    invoke-static {v0}, Lcom/waiqin365/lightapp/kehu/CMSearchingForVisitActivity;->h(Lcom/waiqin365/lightapp/kehu/CMSearchingForVisitActivity;)Landroid/widget/LinearLayout;

    move-result-object v0

    invoke-virtual {v0, v7}, Landroid/widget/LinearLayout;->setVisibility(I)V

    iget-object v0, p0, Lcom/waiqin365/lightapp/kehu/gc;->a:Lcom/waiqin365/lightapp/kehu/CMSearchingForVisitActivity;

    invoke-static {v0}, Lcom/waiqin365/lightapp/kehu/CMSearchingForVisitActivity;->c(Lcom/waiqin365/lightapp/kehu/CMSearchingForVisitActivity;)Lcom/waiqin365/lightapp/dailyreport/view/CustomListview;

    move-result-object v0

    invoke-virtual {v0, v6}, Lcom/waiqin365/lightapp/dailyreport/view/CustomListview;->setVisibility(I)V

    goto :goto_3

    nop

    :pswitch_data_0
    .packed-switch 0x13
        :pswitch_0
    .end packed-switch
.end method
